<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<% String basePath = request.getContextPath(); %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
	<head>
	    <meta charset="utf-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <title>国台会务系统</title>
	    <meta name="description" content="">
	    <meta name="keywords" content="index">
	    <meta name="viewport" content="width=device-width, initial-scale=1">
	    <meta name="renderer" content="webkit">
	    <meta http-equiv="Cache-Control" content="no-siteapp" />
	    <link rel="icon" type="image/png" href="<%=basePath%>/resources/assets/i/favicon.png">
	    <link rel="apple-touch-icon-precomposed" href="<%=basePath%>/resources/assets/i/app-icon72x72@2x.png">
	    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
	    <script src="<%=basePath%>/resources/assets/js/charts/echarts.min.js"></script>
	    <link rel="stylesheet" href="<%=basePath%>/resources/assets/css/amazeui.min.css" />
	    <link rel="stylesheet" href="<%=basePath%>/resources/assets/css/amazeui.datatables.min.css" />
	    <link rel="stylesheet" href="<%=basePath%>/resources/assets/css/app.css">
	    <link href="<%=basePath%>/resources/css/mui/mui.min.css" rel="stylesheet" />
	    
	    
	    <link rel="stylesheet" href="<%=basePath%>/resources/assets/css/amazeui.css" />
		<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
		<link rel="stylesheet" href="<%=basePath%>/resources/assets/css/core.css" />
		<link rel="stylesheet" href="<%=basePath%>/resources/assets/css/menu.css" />
		<link rel="stylesheet" href="<%=basePath%>/resources/assets/css/index.css" />
		<link rel="stylesheet" href="<%=basePath%>/resources/assets/css/admin.css" />
		<link rel="stylesheet" href="<%=basePath%>/resources/assets/css/page/typography.css" />
		<link rel="stylesheet" href="<%=basePath%>/resources/assets/css/page/form.css" />
		<style type="text/css">
			.card-box {
			    box-shadow: 0 0px 8px 0 rgba(0, 0, 0, 0.06), 0 1px 0px 0 rgba(0, 0, 0, 0.02);
			    -webkit-border-radius: 5px;
			    border-radius: 5px;
			    -moz-border-radius: 5px;
			    background-clip: padding-box;
			    margin-bottom: 20px;
			    background-color: #ffffff;
			}
			
			.am-modal-bd {
			    /* padding: 15px 10px; */
			    text-align: center;
			    border-bottom: 1px solid #dedede;
			    border-radius: 2px 2px 0 0;
			}
		</style>
	    
	</head>
	
<body data-type="widgets">
    <script src="<%=basePath%>/resources/assets/js/theme.js"></script>
    <div class="am-g tpl-g">
        <!-- 头部 -->
        <header>
            <!-- logo -->
            <!-- 右侧内容 -->
                <!-- 其它功能-->
                <div class="am-fr tpl-header-navbar">
                    <ul>
                        <!-- 欢迎语 -->
                        <li class="am-text-sm tpl-header-navbar-welcome">
                            <a href="javascript:;" onclick="lookInfo()">欢迎你, <span>${users.realName}</span> </a>
                        </li>

                        <!-- 退出 -->
                        <li class="am-text-sm tpl-header-navbar-welcome">
                            <a href="javascript:;" id = "logout">
                                <span class="am-icon-sign-out"></span> 退出
                            </a>
                        </li>
                    </ul>
                </div>
        </header>
        <!-- 风格切换 -->
        <!-- 侧边导航栏 -->


    </div>
        <!-- 内容区域 -->
        <div class="">
            <div class="row-content am-cf">
                <div class="row">
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                        <div class="widget am-cf">
                            <div class="widget-head am-cf"><center>会务议程图</center></div>
                          
                            <div class="widget-body  am-fr">
                                <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                                    <div class="am-form-group">
                                        <div class="am-btn-toolbar">
                                            <div class="am-btn-group am-btn-group-xs">
                                            	<c:if test="${users.isAdmin == 1}">
                                                	<button type="button" onclick="editAgenda()" class="am-btn am-btn-default am-btn-warning"><span class="am-icon-edit"></span> 编辑 </button>
                                            	</c:if>
                                            	<c:if test="${users.isAdmin == 0 || users.isAdmin == 2}">
                                               		<button type="button" onclick="lookInfo()" class="am-btn am-btn-default am-btn-secondary" style="margin-left: 10px;"><span class="am-icon-archive"></span> 查看个人信息 </button>
                                          		</c:if>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                
                                
                                <div class="am-u-sm-12 am-u-md-12 am-u-lg-3">
                                    <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
                                        <span class="am-input-group-btn">
								            <!-- <button class="am-btn  am-btn-default am-btn-success tpl-table-list-field am-icon-search" type="button"></button> -->
								        </span>
                                    </div>
                                </div>

                                <div class="am-u-sm-12">
                                  <figure data-am-widget="figure" class="am am-figure am-figure-default"   data-am-figure="{  pureview: 'true' }">
							      	 <img style="height: 60%;" src="${ctx}/${agenda.contentImg}" data-rel="${ctx}/${agenda.contentImg}" alt="议程图"/>
							         <figcaption class="am-figure-capition-btm">
							           	${agenda.agendaName}
							         </figcaption>
							       </figure>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    
	    
	<div class="am-modal am-modal-no-btn" tabindex="-1" id="your-modal">
		  <div class="am-modal-dialog">
			<div class="am-modal-hd">
				个人信息
			  <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
			</div>
			<div class="am-modal-bd">
				<div class="">
					<div class="content-page">
						<!-- Start content -->
						<div class="content">
							<div class="am-g">
								<!-- Row start -->
									<div class="am-u-sm-12">
										<div class="card-box">
											
											<div class="am-g">
												<div class="am-u-md-6">
													<form class="am-form am-text-sm" >
														<div class="am-form-group">
															<div class="am-g">
															  <label class="am-u-md-2 am-md-text-right am-padding-left-0" for="doc-ipt-text-1">用户名</label>
															  <input class="am-u-md-10 form-control"  id="doc-ipt-text-1" placeholder="" value="${users.userName}" readonly="readonly">
														  </div>
														</div>
														
														<div class="am-form-group">
															<div class="am-g">
															  <label class="am-u-md-2 am-md-text-right am-padding-left-0" for="doc-ipt-email-1">姓名</label>
															  <input class="am-u-md-10 form-control"  id="doc-ipt-email-1"  value="${users.realName}" readonly="readonly">
															</div>
														</div>
														
														<div class="am-form-group">
															<div class="am-g">
															  <label class="am-u-md-2 am-md-text-right am-padding-left-0" for="doc-ipt-pwd-1">公司</label>
															  <input class="am-u-md-10"   id="doc-ipt-pwd-1" value="${users.company}" readonly="readonly">
															</div>
														</div>
														
														<div class="am-form-group">
															<div class="am-g">
															  <label class="am-u-md-2 am-md-text-right am-padding-left-0" for="doc-ipt-phd-1">电话</label>
															  <input class="am-u-md-10 form-control"  id="doc-ipt-phd-1" value="${users.phone}" readonly="readonly">
															</div>
														</div>
														<div class="am-form-group">
															<div class="am-g">
															  <label class="am-u-md-2 am-md-text-right am-padding-left-0" for="doc-ipt-phd-1">身份证号</label>
															  <input class="am-u-md-10 form-control"  value="${users.idCard}" readonly="readonly">
															</div>
														</div>
														
													</form>
												</div>
												
												<div class="am-u-md-6">
													<form class="am-form am-text-sm" >
														<div class="am-form-group">
															<div class="am-g">
															  <label class="am-u-md-2 am-md-text-right am-padding-left-0" for="doc-ipt-phd-1">性别</label>
															  <c:if test="${users.sex=='1'}">
																  <input class="am-u-md-10 form-control"  value="男" readonly="readonly">
															  </c:if>
															  <c:if test="${users.sex=='0'}">
																  <input class="am-u-md-10 form-control"  value="女" readonly="readonly">
															  </c:if>
															</div>
														</div>
													
														<div class="am-form-group">
															<div class="am-g">
															  <label class="am-u-md-2 am-md-text-right am-padding-left-0" for="doc-ipt-text-1">出发时间</label>
															  <input class="am-u-md-10 form-control"  value="${users.departureTime}" readonly="readonly">
														  </div>
														</div>
														
														<div class="am-form-group">
															<div class="am-g">
															  <label class="am-u-md-2 am-md-text-right am-padding-left-0" for="doc-ipt-email-1">到站时间</label>
															  <input class="am-u-md-10 form-control"   value="${users.arrivalTime}" readonly="readonly">
															</div>
														</div>
														
														<div class="am-form-group">
															<div class="am-g">
															  <label class="am-u-md-2 am-md-text-right am-padding-left-0" for="doc-ipt-pwd-1">离开日期</label>
															  <input  class="am-u-md-10 form-control"  value="${users.leaveTime}" readonly="readonly">
															</div>
														</div>
													</form>
												</div>
											</div>
										</div>
									</div>
								<!-- Row end -->
							</div>
					
						</div>
					</div>
			    </div>
			
			  <button onclick="btClose();" >关闭</button>
			</div>
		  </div>
		</div>
	
	
	<script src="<%=basePath%>/resources/js/mui/mui.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>/resources/assets/js/jquery-2.1.0.js" ></script>
	<script src="<%=basePath%>/resources/assets/js/amazeui.min.js"></script>
	<script src="<%=basePath%>/resources/assets/js/app.js"></script>
	<script type="text/javascript" src="<%=basePath%>/resources/assets/js/blockUI.js" ></script>
    <script type="text/javascript">
	    
	    function editAgenda(userId){
	    	window.top.location.href = "${ctx}/agenda/agendaPage?agendaId=1";
	    }
	    
	    function lookInfo(){
	    	/* var $modal = $('#your-modal');
			$modal.modal(); */
	    	window.top.location.href = "${ctx}/userSystem/details";
	    }
	    
	    function btClose(){
	    	var $modal = $('#your-modal');
	    	$modal.modal('close');
	    }
	    
	    //退出登录功能
	    $("#logout").click(function(){
	    	 var btnArray = ['是', '否'];
	    	 mui.confirm('确定退出登录吗？', '提示', btnArray, function(e) {
	             if (e.index == 0) {
	            	 window.top.location.href = "${ctx}/userSystem/logOut";
	             }
	         })
	    })
	    
	    function deleteUser(userId){
	    	 var btnArray = ['是', '否'];
	    	 var usersId = '${users.userId}';
	    	 if(usersId===userId){
	    		 mui.toast('不能删除自己账户！'); 
	    	 }else{
	             mui.confirm('删除将不可恢复，确认？', '提示', btnArray, function(e) {
	                 if (e.index == 0) {
	                	 mui.ajax('${ctx}/userSystem/deleteUser',{
	  						data:{"userId":userId},
	  						dataType:'json',
	  						type:'post',
	  						async:false,
	  						success:function(data){
	  							if(data == 1){
	  								 mui.toast('删除成功'); 
	  								//window.top.location.href = "${ctx}/userSystem/registerPage";
	  								 window.location.reload();
	  							 }else{
	  								 mui.alert("网络错误，删除失败！",'提示');
	  							 }
	  						}
	  					}); 
	                 }
	             })
	    	 }
	    }
    </script>	    

	</body>
</html>
